<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="nav" content="0" />
<meta name="acc" content="_plan-1" />
<title>监督计划列表</title>
<script type="text/javascript">
	$(document).ready(function() {
		$("#addPlan").click(function() {
			url = "${ctx}/quality/plan!input.action?projectId=${projectId}";
			window.location.href = url;
		});
	});
</script>
</head>
<body>
	<div id="heading" class="plan">
		<h6>日常监督计划</h6>
	</div>
	<div id="message">
		<s:actionmessage theme="custom" cssClass="success" />
	</div>
	<form action="${ctx }/quality/plan.action?projectId=${projectId}"
		method="post" id="mainForm" class="yform">
		<input type="hidden" name="filter_LIKES_projectInfo.id"
			id="filter_LIKES_projectInfo.id"
			value="${param['filter_LIKES_projectInfo.id'] }">
		<div id="filter">
			<ul>
				<li>监督编号：<input type="text" name="filter_LIKES_superviserCode"
					value="${param['filter_LIKES_superviserCode']}" />
				</li>
				<li>编制人：<input type="text" name="filter_LIKES_preparer"
					value="${param['filter_LIKES_preparer']}" />
				</li>
			</ul>
			<div class="type-button">
				<input type="button" value="查询" onclick="search();" class='search' />
			</div>
		</div>
		<div id="content">
			<table>
				<tr>
					<th>序号</th>
					<th>监督编号</th>
					<th>项目名称</th>
					<th>编制人</th>
					<th>编制时间</th>
					<th>状态</th>
					<th>操作</th>
				</tr>
				<c:forEach items="${page.result }" var="plan" varStatus="status">
					<tr>
						<td>${page.first+status.index }</td>
						<td>${plan.superviserCode }</td>
						<td><pt:labels type="proj" argument1="${plan.projectId }"
								single="true"></pt:labels>
						</td>
						<td>${plan.preparer }</td>
						<td><fmt:formatDate value="${plan.preparerDate }"
								pattern="yyyy-MM-dd" />
						</td>
						<td><pt:code category="3062" code="${plan.status }"></pt:code> </td>
						<td><c:if test="${plan.status == '99' }">
								<a
									href="${ctx}/quality/plan!png.action?id=${plan.id}&projectId=${plan.projectId}">查看</a>
							</c:if> <c:if test="${plan.status != '99' }">
								<c:if test="${plan.status == '01' }">
									<a
										href="${ctx}/quality/plan!input.action?id=${plan.id}&projectId=${plan.projectId}">编辑</a>
									<a
										href="${ctx}/quality/plan!delete.action?id=${plan.id}&projectId=${plan.projectId}">删除</a>
									<a
										href="${ctx}/quality/plan!start.action?id=${plan.id}&projectId=${plan.projectId}"
										onclick="return isProcess();">提交</a>
								</c:if>
								<c:if test="${plan.status != '01' }">
									<a
										href="${ctx}/quality/plan!input.action?id=${plan.id}&projectId=${plan.projectId}">编辑</a>
									<a
										href="${ctx}/quality/plan!delete.action?id=${plan.id}&projectId=${plan.projectId}">删除</a>
									<a
										href="${ctx}/quality/plan!judge.action?id=${plan.id}&projectId=${plan.projectId}">处理</a>
								</c:if>
							</c:if>
						</td>
					</tr>
				</c:forEach>
			</table>
		</div>
		<jsp:include page="/common/page.jsp" flush="true" />
		<div class="type-button">
			<input id="addPlan" type="button" class="add" value="新增" />
		</div>
	</form>
</body>
</html>